<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Personal info</title>
</head>
<body style="text-align:center;margin:0 auto;">
	<h1>Personal info</h1>
	<form action="update" method="post">
	<input type="hidden" name="id" value="${c.id}" />
		cname:&nbsp;<input type="text" name="name" value="${c.name}" /><br /> 
		sal:&nbsp;<input type="number" name="sal" value="${c.sal}" /><br /> 
		birth:&nbsp;<input type="date" name="birth" value="<fmt:formatDate value="${c.birth}" pattern="yyyy-MM-dd" />"/><br /> 
			<c:if test="${c.sex eq '女'}"> 
		sex:&nbsp;<input type="radio" name="sex" value="男"  />男
			      <input type="radio" name="sex" value="女" checked="checked" />女<br /> 
			</c:if>
			<c:if test="${c.sex eq '男'}"> 
		sex:&nbsp;<input type="radio" name="sex" value="男"  checked="checked" />男
			      <input type="radio" name="sex" value="女"  />女<br /> 
			</c:if>
			<c:if test="${c.favs.indexOf('soccer')>=0 && c.favs.indexOf('basketball')<0}">
		favs:&nbsp;<input type="checkbox" name="favs" value="soccer" checked="checked" />soccer
		     <input type="checkbox" name="favs" value="basketball" />basketball<br /> 
			</c:if>
			<c:if test="${c.favs.indexOf('basketball')>=0 && c.favs.indexOf('soccer')<0 }">
		favs:&nbsp;<input type="checkbox" name="favs" value="soccer"  />soccer
		     <input type="checkbox" name="favs" value="basketball" checked="checked"/>basketball<br /> 
			</c:if>
			<c:if test="${c.favs.indexOf('basketball')>=0 && c.favs.indexOf('soccer')>=0 }">
		favs:&nbsp;<input type="checkbox" name="favs" value="soccer" checked="checked" />soccer
		     <input type="checkbox" name="favs" value="basketball" checked="checked"/>basketball<br /> 
			</c:if>
			
			
		     <input type="submit" name="submit" />update<br/>
	</form>

</body>
</html>